/**
 * 
 */
package zeroj.web.context;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 
 * @author lyl(lylsir at gmail dot com)
 * 
 * @since 1.0
 * 
 * 2008-9-10
 */
public class ValueStack implements Serializable {

	private static final long serialVersionUID = 3339068488823016951L;
    private Map<Object, Object> valueMap = new HashMap<Object, Object>();
    private Serializable login = null;
    private String loginRole = null;
    
	public void set(Object key, Object value) {
		valueMap.put(key, value);
	}
	public Object get(Object key) {
		
		return valueMap.get(key);
	}
	public Object remove(Object key) {
		
		return valueMap.remove(key);
	}
	public boolean isLogin() {
		return login != null;
	}

	public Serializable getLogin() {
		return login;
	}

	public void setLogin(Serializable login) {
		this.login = login;
	}

	public String getLoginRole() {
		return loginRole;
	}

	public void setLoginRole(String loginRole) {
		this.loginRole = loginRole;
	}
	
}
